package msu.ml.core.xml;

import msu.ml.core.*;
import msu.ml.data.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;

/**
 * @author Reginald M Mead
 * @version 1.0
 */
public class SubsamplePreProcessorParser implements IPreProcessorParser
{
	public IDataPreProcessor parse(Element element)
   {
      double size = Double.parseDouble(element.getAttribute("sample_size")); 
      if(ApplicationSettings.getInstance().getConfig("verbose").equals("true"))
			System.out.println("Subsample Pre Processor, use " 
					+ (size * 100.0) + "%");

      return new SubsamplePreProcessor(size);
   }
}
